home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.10
/
medplayerlibrary
/
medplayer.i
< prev
next >
Wrap
Text File
|
1995-04-19
|
4KB
|
158 lines
{
------------------------------------------------------------------
med.player.i
4 use with PCQ-Pascal, (P) 1993 by "Diesel" B. Künnen
Zum Linken zusätzlich die medplayer.library verwenden : { !!! }
blink mySrc.o to mySrc library pcq:pcq.lib pcq:diesel.lib ND SD SC
------------------------------------------------------------------
}
Type
MMD0 = RECORD
ID, { "MMD0" }
Modlen : Integer; { module length (in bytes) }
MMD0song : Address; { pointer to song (see med.h) }
Songlen : Integer; { length of song (usually zero) }
MMD0block : Address; { pointer to pointers of blocks }
BlockArrlen : Integer; { length... }
Soitin : Address; { pointer to pointers of samples }
SmplArrlen : Integer; { len.. }
MMD0exp : Address; { pointer to expansion data (see med.h) }
ExpSize : Integer; { len.. (don't care about these) }
{ Followed by some private variables that have become obsolete in V3.00... }
End;
MMD0Ptr = ^MMD0;
InstrExt = Record { THIS STRUCT MAY GROW IN THE FUTURE!! }
hold, { to get the correct size, examine s_ext_entrsz }
decay : Byte;
End;
InstrExtPtr = ^InstrExt;
MMD0exp = Record
reserved : Integer; { for future... }
InstrExt : Address;
s_ext_entries, { # of entries }
s_ext_entrsz : Short; { size of entry}
annotxt : Address; { song name, ©, notes etc... }
annolen : Integer; { length (including 0-byte) }
reserved2 : Array[1..16] of Integer; { better have enough of these... }
End;
MMD0expPtr = ^MMD0exp;
MMD0sample = Record
rep,replen : Short; { offs: 0(s), 2(s) }
midich, { offs: 4(s) }
midipreset, { offs: 5(s) }
svol, { offs: 6(s) }
strans : Byte; { offs: 7(s) }
End;
MMD0samplePtr = ^MMD0sample;
MMD0song = Record
MMD0sample : Array[1..63] of MMD0Sample;
{ 63 * 8 bytes = 504 bytes }
numblocks, { offs: 504 }
songlen : Short; { offs: 506 }
playseq : Array[1..256] of Byte;{ offs: 508 }
deftempo : Short; { offs: 764 }
playtransp, { offs: 766 }
flags, { offs: 767 }
reserved, { offs: 768 }
tempo2 : Byte; { offs: 769 }
trkvol : Array[1..16] of Byte; { offs: 770 }
mastervol, { offs: 786 }
numsamples : Byte; { offs: 787 }
End;
MMD0SongPtr = ^MMD0Song; { length = 788 bytes }
{ FLAGS of the above structure }
Const
FLAG_FILTERON = $0001; { hardware low-pass filter }
FLAG_JUMPINGON = $0002; { jumping.. (not used in modules) }
FLAG_JUMP8TH = $0004; { jump 8th.. " " " }
FLAG_INSTRSATT = $0008; { instruments are attached (sng+samples) }
FLAG_VOLHEX = $0010; { volumes are represented as hex }
FLAG_STSLIDE = $0020; { no effects on 1st timing pulse (STS) }
FLAG_8CHANNEL = $0040; { OctaMED 8 channel song }
{ -- Const f. GetPlayer() -- }
NoMidi = 0;
Midi = 1;
{ -- name of the library, 4 opening it -- }
medname = "medplayer.library";
VAR
MEDPlayerBase : Address; { must be opened before }
{ using the library !!! }
{ -- Functions & Procedures ... !!! Have fun with it ! -- }
Function GetPlayer( midiORnot : Integer ): Integer; { 0 = OK ; <>0 failed }
External;
Procedure FreePlayer;
External;
Procedure PlayModule( mux : MMD0Ptr );
External;
Procedure ContModule( mux : MMD0Ptr );
External;
Procedure StopPlayer;
External;
Procedure DimOffPlayer( songlines : Integer );
External;
Procedure SetTempo( harry : Short );
External;
Function LoadModule( song : String ): MMD0Ptr;
External;
Procedure UnLoadModule( mux : MMD0Ptr );
External;
Function GetCurrentModule : MMD0Ptr;
External;
Procedure ResetMidi;
External;